home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
6_11.lha
/
6_11
/
6_11_cmp.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
483b
|
22 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
*
Compare the n ARB_type's pointed
to by l1 and l2. Return -1, 0 or 1
dependent on whether l1 is less than,
equal or greater than l2.
/
include <arbint.h>
nt arb_cmp(const ARB_type *l1,
const ARB_type *l2, int n)
if (l1 != l2)
while (--n >= 0)
if (*l1++ != *l2++)
return (l1[-1] > l2[-1] ? 1 : -1);
return (0);